<!--{if empty($_GET['inajax'])}-->
<!--{if defined('IN_MOBILE')}-->
<!--{template login_single_mobile}-->
<!--{else}-->
<!--{template login_single}-->
<!--{/if}-->
<!--{else}-->
<!--[if lt IE 9]>
<script src="static/js/jquery.placeholder.js" type="text/javascript"></script>
<![endif]-->
<!--{eval $loginhash = 'L'.random(4);}-->
<script src="user/scripts/login.js" type="text/javascript"></script>
<style>
    .form-login .form-group-lg{
        margin-bottom:20px;
    }
    .form-login .form-group-lg .form-control{
        padding:10px 16px;
        height:46px;
    }
    #popModal .modal-dialog{
        max-width:350px;
        margin:30px auto;
    }
    @media (min-width: 370px){
        #popModal .modal-dialog{
            margin:20px auto
        }
    }
    @media (min-width: 768px){
        #popModal .modal-dialog{
            margin:30px auto
        }
    }
</style>
<div id="main_message">
    <div id="layer_login_$loginhash" >
        <div class="modal-header">
            <!--{if !empty($_GET['inajax'])}--><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><!--{/if}-->
            <h4  class="modal-title text-center" ><span id="returnmessage_$loginhash">$_G['setting']['sitename']<!--{if $_G['setting']['bbclosed']>0}--> - $_G['setting']['closedreason']<!--{/if}--> </span></h4>
        </div>
        <div class="modal-body" style="font-size:14px;padding:30px 30px 20px 30px;">
            <form method="post"  name="login " id="loginform_$loginhash" class="form-login"   role="form" onsubmit="{if $setting['pwdsafety']}pwmd5('password3_$loginhash');{/if}pwdclear = 1; loginsub('loginform_$loginhash', 'returnmessage_$loginhash');return false;"  action="user.php?mod=sso&op=login&loginsubmit=yes{if !empty($_GET['handlekey'])}&handlekey=$_GET[handlekey]{/if}{if isset($_GET['frommessage'])}&frommessage{/if}&loginhash=$loginhash">
                <input type="hidden" name="formhash" value="{FORMHASH}" />
                <input type="hidden" name="referer" value="{echo dreferer()}" />
                <!--{if $auth}-->
                <input type="hidden" name="auth" value="$auth" />
                <!--{/if}-->
                <!--{if $invite}-->
                <div class="form-group form-group-lg">
                    {lang register_from}<a href="user.php?mod=space&uid=$invite[uid]" target="_blank">$invite[username]</a>
                </div>
                <!--{/if}-->

                <!--{if !$auth}-->
                <div class="form-group form-group-lg">
                    <input type="text" class="form-control" id="email_$loginhash" placeholder="邮箱或用户名" name="email"  autocomplete="off"  >

                </div>
                <div class="form-group form-group-lg">
                    <input type="password"  class="form-control " id="password3_$loginhash" placeholder="登录密码" name="password" onfocus="clearpwd()" autocomplete="off"  >
                </div>

                <!--{/if}-->

                <!--{if empty($_GET['auth']) || $questionexist}-->

                <div id="loginanswer_row_$loginhash" class="form-group form-group-lg" {if !$questionexist} style="display:none"{/if}>
                <input type="text" class="form-control"  name="answer" id="loginanswer_$loginhash" autocomplete="off"  />
        </div>
        <div class="form-group form-group-lg" >
            <label class="checlbox checkbox-inline"><input type="checkbox"  name="cookietime" id="cookietime_$loginhash"  value="2592000" $cookietimecheck /> 30天内自动登录</label>
            <a class="pull-right" tabindex="-1" href="javascript:;" onclick="{if !empty($_GET['inajax'])} _login.logging('user.php?mod=login&op=logging&action=lostpasswd&inajax=1'){else}jQuery('#popModal .modal-dialog').load('user.php?mod=login&op=logging&action=lostpasswd&inajax=1'){/if};return false">{lang getpassword}</a>
        </div>
        <!--{/if}-->

        <!--{if $secqaacheck || $seccodecheck}-->
        <!--{block sectpl}-->
        <sec>
            <sec>
                <sec>
                    <!--{/block}-->
                    <div class="form-group" style="margin-bottom:20px;">
                        <!--{template common/seccheck}-->
                    </div>
                    <!--{/if}-->

                    <div class="form-group form-group-lg" >
                        <button class="btn btn-primary btn-block"  type="submit" name="loginsubmit" value="true" ><strong style="line-height:30px;">登&nbsp;&nbsp;&nbsp;录</strong></button>
                        <!-- <!--{if !$setting['bbclosed'] && !empty($_GET['inajax'])}--><a class="btn btn-link" href="javascript:;" onclick="ajaxget('user.php?mod=clearcookies&formhash={FORMHASH}', 'returnmessage1_$loginhash', 'returnmessage1_$loginhash');return false;" title="{lang login_clearcookies}" class="pull-right"> <span id="returnmessage1_$loginhash" class="text-muted ">{lang login_clearcookies}</span></a><!--{/if}--> -->
                    </div>
                    <!--{if $_G['setting']['regstatus']>0}-->
                    <div class="form-group last" style="margin-bottom:0" >
                        还没有帐号？&nbsp;<a  class="" tabindex="-1" href="user.php?mod=register"  <!--{if !empty($_GET['inajax'])}-->onclick="_login.register();return false;"<!--{/if}-->  title="$_G['setting']['reglinkname']">$_G['setting']['reglinkname']</a>
                    </div>
                    <!--{/if}-->
                    </form>
                    <!--{if !empty($_G['allow_loginmod'])}-->
                    <div class="third-login-wraper" style="padding-top:15px;margin-top:15px;border-top:1px solid #DDD;">
                        <span class="third-login-header">其他登录：</span>
                       <!--{Hook login_mod}-->
                    </div>
                    <!--{/if}-->
    </div>
    <!--{if $_G['setting']['pwdsafety']}-->
    <script type="text/javascript" src="{$_G['setting']['jspath']}md5.js?{VERHASH}" reload="1"></script>
    <!--{/if}-->
</div>


</div>
<div class="nfl" id="main_succeed" style="display: none">
    <div class="modal-body">
        <div class="alert_right">
            <div id="succeedmessage"></div>
            <div id="succeedlocation" class="alert_btnleft"></div>
            <p class="alert_btnleft"><a id="succeedmessage_href">{lang message_forward}</a></p>
        </div>
    </div>
</div>
<div id="layer_message_$loginhash" style="display: none;">
    <div class="modal-header">
        <!--{if !empty($_GET['inajax'])}--><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><!--{/if}-->
        <h4  class="modal-title" ><span id="returnmessage_$loginhash"> {lang login_member}</span></h4>
    </div>
    <div  class="modal-body">
        <div class="alert_right">
            <div id="messageleft_$loginhash"></div>
            <p class="alert_btnleft" id="messageright_$loginhash"></p>
        </div>
    </div>
</div>
<script type="text/javascript" reload="1">
    var pwdclear = 1;
    function initinput_login() {
        document.body.focus();
        <!--{if !$auth}-->
        if(document.getElementById('loginform_$loginhash')) {
            document.getElementById('loginform_$loginhash').email.focus();
        }
        <!--{/if}-->
    }
    initinput_login();
    function clearpwd() {
        if(pwdclear) {
            document.getElementById('password3_$loginhash').value = '';
        }
        pwdclear = 0;
    }
    jQuery(document).ready(function(e) {
        if(jQuery('.ie8,.ie9').length){ //ie8模拟placeholder;
            jQuery(':input[placeholder]').each(function(){
                jQuery(this).placeholder();
            });
        }
    });
</script>

<!--{/if}-->
